import request from "../utils/request";



// 查询所有数据
export const queryAllapi = ()=>request.get('/depts')

// 新增一条数据
export const addApi = (dept) => request.post('/depts', dept)

// 根据id查询数据
export const queryByIdApi = (id) => request.get(`/depts/${id}`)

// 根据id更新数据
export const updateApi = (dept) => request.put(`/depts`, dept)

// 根据id删除数据
export const deleteApi = (id) => request.delete(`/depts/${id}`)